package com.itheima.marking_system.service.impl;

import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;

import com.itheima.marking_system.service.ChatService;
import com.itheima.marking_system.utils.aliyun.QianWenChat;
import org.springframework.stereotype.Service;

@Service
public class ChatServiceImpl implements ChatService {
    @Override
    public String chatAi(String role,String question) throws NoApiKeyException, InputRequiredException {
        return  QianWenChat.callWithMessage(role,question);
    }


}